package com.findMoneyGame.models {
	import flash.events.EventDispatcher;
	import com.findMoneyGame.events.GameLevelPropertyChangedEvent;

	public class GameLevelData extends EventDispatcher {
		private var _level : int;
		private var _reward : int;
		private var _bonusTimeReward : int;
		private var _passLevelPrice : int;
		private var _hintPrice : int;
		private var _hintTime : int;
		private var _loupePrice : int;
		private var _loupeTime : int;
		private var _failingPrice : int;
		private var _targetRectX : int;
		private var _targetRectY : int;
		private var _targetRectWidth : int;
		private var _targetRectHeight : int;
		private var _imageUrl : String;

		public function get level () : int { return _level; }
		public function get reward () : int { return _reward; }
		public function get bonusTimeReward () : int { return _bonusTimeReward; }
		public function get passLevelPrice () : int { return _passLevelPrice; }
		public function get hintPrice () : int { return _hintPrice; }
		public function get loupePrice () : int { return _loupePrice; }
		public function get loupeTime () : int { return _loupeTime; }
		public function get hintTime () : int { return _hintTime; }
		public function get failingPrice () : int { return _failingPrice; }
		public function get targetRectX () : int { return _targetRectY; }
		public function get targetRectY () : int { return _targetRectY; }
		public function get targetRectWidth () : int { return _targetRectWidth; }
		public function get targetRectHeight () : int { return _targetRectHeight; }
		public function get imageUrl () : String { return _imageUrl; }

		public function set level (value : int) { _level = value; propertyChanged('level'); }
		public function set reward (value : int) { _reward = value; propertyChanged('reward'); }
		public function set bonusTimeReward (value : int) { _bonusTimeReward = value; propertyChanged('bonusTimeReward'); }
		public function set passLevelPrice (value : int) { _passLevelPrice = value; propertyChanged('passLevelPrice'); }
		public function set hintPrice (value : int) { _hintPrice = value; propertyChanged('hintPrice'); }
		public function set loupePrice (value : int) { _loupePrice = value; propertyChanged('loupePrice'); }
		public function set loupeTime (value : int) { _loupeTime = value; propertyChanged('loupeTime'); }
		public function set hintTime (value : int) { _hintTime = value; propertyChanged('hintTime'); }
		public function set failingPrice (value : int) { _failingPrice = value; propertyChanged('failingPrice'); }
		public function set targetRectX (value : int) { _targetRectY = value; propertyChanged('targetRectX'); }
		public function set targetRectY (value : int) { _targetRectY = value; propertyChanged('targetRectY'); }
		public function set targetRectWidth (value : int) { _targetRectWidth = value; propertyChanged('targetRectWidth'); }
		public function set targetRectHeight (value : int) { _targetRectHeight = value; propertyChanged('targetRectHeight'); }
		public function set imageUrl (value : String) { _imageUrl = value; propertyChanged('imageUrl'); }

		private function propertyChanged (property : String) {
			dispatchEvent(new GameLevelPropertyChangedEvent(property));
		}
	}
}